<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class women {
            //公有属性
            name = 'herry'

            //私有属性
            #age = '18'
            #height = 100
            //构造器
            constructor(name,age,height){
                this.name = name
                this.#age = age
                this.#height = height
            }
            //公有方法
            show(){
                console.log(this.name)
                console.log(this.#age)
                console.log(this.#height)
            }
           
        }
        var stu = new women('lele',21,89)
        //console.log(stu.#age)
        stu.show()
        
    </script>
</body>
</html>